//
//  SegmentItemDataSource.swift
//  PageNavigator
//
//  Created by 张奇 on 2025/8/15.
//

import UIKit

public class SegmentItemDataSource: SegmentViewControllerDataSource  {
    
    /// 默认是44.0高度
    public var itemHeight: CGFloat = 44.0
    public var itemWidth: CGFloat = 80.0
    
    /// 获取高度
    /// - Returns: 高度
    func getSegmentItemHeight() -> CGFloat {
        return itemHeight + itemPadding.bottom + itemPadding.top
    }
    
    // item 的边界
    public var itemPadding: UIEdgeInsets = UIEdgeInsets.zero
    
    
    /// 子类实现
    /// - Parameter index: index
    /// - Returns: 内容大小
    func calculateSegmentItemContentSize(at index: Int) -> CGSize {
        fatalError("subclass must implement this method:\(#function)")
    }
    
    
    public func getRegisterCellClass() -> AnyClass {
        fatalError("subclass must implement this method:\(#function)")
    }
    
    public func numberOfItems(in content: SegmentViewController) -> Int {
        fatalError("subclass must implement this method:\(#function)")
    }
    
    public func segmentViewController(_ content: SegmentViewController, associatedDataForItemAt index: Int) -> Any {
        fatalError("subclass must implement this method:\(#function)")
    }
    
    public func segmentViewController(_ content: SegmentViewController, sizeForItemAt index: Int) -> CGSize {
        fatalError("subclass must implement this method:\(#function)")
    }
    
    public func segmentViewController(_ content: SegmentViewController, contentSizeForItemAt index: Int) -> CGSize {
        fatalError("subclass must implement this method:\(#function)")
    }
    

}
